package com.example.demo.entity;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;

/**
 * 商品分类 - 图标关联表(IconCategory)表实体类
 *
 * @author makejava
 * @since 2025-08-26 17:22:49
 */
@SuppressWarnings("serial")
public class IconCategory extends Model<IconCategory> {
//分类id
    private Long categoryId;
//图标id
    private Long iconId;


    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public Long getIconId() {
        return iconId;
    }

    public void setIconId(Long iconId) {
        this.iconId = iconId;
    }

    /**
     * 获取主键值 - 由于是复合主键，返回组合值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        // 对于复合主键，返回包含所有主键字段的组合字符串
        return categoryId + "_" + iconId;
    }
}

